package com.yanqu.road.server.cmd.passRoad;

import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.passRoad.PassRoadModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_PASS_ROAD_GET_BACKEND_DETAIL, desc = "一键贸易结果")
public class GetPassRoadBackendDetailCmd extends AbstractCommand {


    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        PassRoadModule passRoadModule = player.getModule(PassRoadModule.class);
        passRoadModule.setBackEndEndPass();
        player.sendPacket(ClientProtocol.U_PASS_ROAD_GET_BACKEND_DETAIL, passRoadModule.getPassRoadBackendDetailRespMsg());
        passRoadModule.resetBackEndPassRecord();
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
